# -*- coding: utf-8 -*-
# flake8: noqa

from qiniu import QiniuMacAuth
from qiniu import Sms

access_key = "wkJupck8Ylduede0ny9KSsIG4vqwDkelgBfejKSv"
secret_key = "i4UrEdihv93LUun8MMG_OCAcGQHwPU6ZiHq5ijMg"

# 初始化Auth状态
q = QiniuMacAuth(access_key, secret_key)

# 初始化Sms
sms = Sms(q)

template_id = '1305041069318094848' # 模板id
mobiles = ['13147865895'] # 手机号
parameters = {'code':'561234'} # 参数
req, info = sms.sendMessage(template_id, mobiles, parameters)
print(req, info)